<template>
  <div class="writing-text">
    <commonBanner
      bgUrl="https://oss-imag.aiseoword.com/aiseo-image/img-tab03-bannerIMG.webp"
      :listArr="['精准引流全面覆盖', '支出费用更低', '效果覆盖广阔']"
      chatInfo="您好, 我想了解更多关于SEO定制的内容"
      buttonText="定制咨询"
    >
      <img class="banner-title-image" src="@/assets/image/mobile/seocust/SEO@2x.png" alt />
      <!-- </h2> -->
      <img class="subtitle-image mt-16" src="@/assets/image/mobile/seocust/rah.png" alt />
    </commonBanner>
    <!-- 内容撰写难题 -->
    <div class="content-write-dificult">
      <img class="title-image" src="@/assets/image/mobile/seocust/1000006726@2x.png" />
      <div
        class="title-contente"
      >新网站没流量？老网站权重提升慢？优质内容产出难？你需要系统化SEO定制服务。根据您业务特性量身定制，及时根据搜索引擎的算法和规则调整策略，专业团队保障内容品质，助力您的网站快速触达更多客户。</div>
      <div class="dificult-list-outer scrollbar-class">
        <div class="dificult-list">
          <div class="dificult-item">
            <img
              style="width: 100%;height: 100%;object-fit: cover;"
              src="@/assets/image/mobile/seocust/Group 27@2x.png"
            />
          </div>
          <div class="dificult-item">
            <img
              style="width: 100%;height: 100%;object-fit: cover;"
              src="@/assets/image/mobile/seocust/Group 28@2x.png"
            />
          </div>
          <div class="dificult-item">
            <img
              style="width: 100%;height: 100%;object-fit: cover;"
              src="@/assets/image/mobile/seocust/Group 29@2x.png"
            />
          </div>
          <div class="dificult-item">
            <img
              style="width: 100%;height: 100%;object-fit: cover;"
              src="@/assets/image/mobile/seocust/Group 30@2x.png"
            />
          </div>
        </div>
      </div>
    </div>
    <!-- 更简单 -->
    <div class="more-simple" v-if="currentpage > pageShowNode.simple">
      <img class="title-image" src="@/assets/image/mobile/seocust/Group 19@2x.png" />
      <div
        class="title-contente"
      >作为手握几大高权重网站的实力运营团队，我们有着丰富的从0到1的建站经验帮您完成企业网推第一步，快速迭代迅速提升权重的技巧方案助力您的网站进入目标客户视野，6年以上从业经验的资深内容团队帮您高效完成内容运营。我们将为您提供系统性SEO整合方案，助力您的企业加速发展。</div>
    </div>
    <!-- pc轮播对应 -->
    <swipperlist :carouselList="carouselList" v-if="currentpage > pageShowNode.simple"></swipperlist>
    <endButton v-if="currentpage > pageShowNode.simple"></endButton>
    <div class="loading-box" v-show="loadingPage">...加载中</div>
  </div>
</template>

<script setup>
import commonBanner from "@/components/mobileComponent/commonBanner.vue";
import { ref, reactive, onMounted, onUnmounted, onBeforeUnmount } from "vue";
import EventBus from "@/utils/eventBus.js";
import img1 from "@/assets/image/mobile/seocust/monitoring@2x (1).png";
import img2 from "@/assets/image/mobile/seocust/Ranking@2x (1).png";
import img3 from "@/assets/image/mobile/seocust/cost@2x (1).png";
import img4 from "@/assets/image/mobile/seocust/widecoverage@2x (1).png";
import img5 from "@/assets/image/mobile/seocust/keyword@2x.png";

import swipperTitle1 from "@/assets/image/mobile/seocust/Frame 1000006727@2x.png";
import swipperTitle2 from "@/assets/image/mobile/seocust/Frame 1000006728@2x.png";
import swipperTitle3 from "@/assets/image/mobile/seocust/Frame 1000006729@2x.png";
import swipperTitle4 from "@/assets/image/mobile/seocust/Frame 1000006730@2x.png";
import swipperTitle5 from "@/assets/image/mobile/seocust/Frame 1000006731@2x.png";
import swipperlist from "@/components/mobileComponent/swipperlist.vue";
import endButton from "@/components/mobileComponent/endButton.vue";

// 分段加载页面
const currentpage = ref(1);
const loadingPage = ref(false);
const pageShowNode = reactive({
  simple: 1
});
const handleScrollToBottom = () => {
  if (currentpage.value < 2) {
    loadingPage.value = true;
    setTimeout(() => {
      currentpage.value++;
      loadingPage.value = false;
    }, 1000);
  }
};
// 判断是否存在滚动条，
const initScroll = () => {
  const appDiv = document.getElementById("app");
  if (appDiv.scrollHeight > appDiv.clientHeight) {
    return;
  } else {
    currentpage.value++;
    nextTick(() => {
      initScroll();
    });
  }
};
const carouselList = ref([
  {
    img: img1,
    titleImg: swipperTitle1,
    title: "海量关键词优化",
    disc:
      "通过多种关键词内容系统, 快速生成不同类型内容页, 覆盖更多长尾关键词。"
  },
  {
    img: img2,
    titleImg: swipperTitle2,
    title: "排名效果显著",
    disc:
      "SEO优化核心技术能够轻松做到优化一个核心词, 匹配一批关键词到首页, 为网站带来更多高频流量！"
  },
  {
    img: img3,
    titleImg: swipperTitle3,
    title: "成本费用更低",
    disc:
      "费用远低于行业同类产品. 我们坚持用更低的成本实现更好的效果。"
  },
  {
    img: img4,
    titleImg: swipperTitle4,
    title: "效果覆盖广阔",
    disc:
      "能够根据不同的搜索引擎的特征，进行针对性的关键词优化排名，关键词排名效果覆盖各大主流搜索引擎."
  },
  {
    img: img5,
    titleImg: swipperTitle5,
    title: "实时监测",
    disc:
      "实时监测让您清晰了解SEO优化排名效果及费用支出情况，用户可随时查看关键词排名的实时数据, 方便快捷.."
  }
]);
onMounted(() => {
  initScroll();
  EventBus.on("scrollToBottom", handleScrollToBottom);
});
onBeforeUnmount(() => {
  EventBus.off("scrollToBottom");
});
</script>

<style lang="scss" scoped>
.writing-text {
  width: 100%;
  .banner-title-image {
    height: 24px;
  }
  .subtitle-image {
    height: 48px;
  }
  .loading-box {
    text-align: center;
    font-family: Microsoft YaHei, Microsoft YaHei;
    font-weight: bold;
    font-size: 10px;
    color: #808080;
    line-height: 24px;
    letter-spacing: 1px;
  }
  .title-contente {
    margin-top: 16px;
    font-family: Microsoft YaHei UI, Microsoft YaHei UI;
    font-weight: 400;
    font-size: 14px;
    color: #808080;
    line-height: 20px;
    padding: 0 40px;
    box-sizing: border-box;
    text-align: center;
  }
  .content-write-dificult {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 80px;
    .title-image {
      width: 148px;
      height: 50px;
      margin: 0 auto;
    }
    .dificult-list-outer {
      width: 100%;
      margin-top: 32px;
      // padding: 16px;
      box-sizing: border-box;
      overflow: overlay;
      .dificult-list {
        display: flex;
        width:750px;
          height: 178px;
          margin-left: 30px;
        // grid-template-rows: repeat(1, 240px);
        // grid-template-columns: repeat(6, 307px);
        .dificult-item {
          background: #ffffff;
          border-radius: 12px;
          width: 166px;
          height: 178px;
          box-sizing: border-box;
          & + .dificult-item {
            margin-left: 12px;
          }
          .dificult-image {
            height: 18px;
          }
          .dificult-title {
            font-family: Microsoft YaHei UI, Microsoft YaHei UI;
            font-weight: bold;
            font-size: 16px;
            color: #1a1a1a;
            line-height: 16px;
            margin-top: 8px;
          }
          .dificult-content {
            font-family: Microsoft YaHei UI, Microsoft YaHei UI;
            font-weight: 400;
            font-size: 14px;
            color: #808080;
            line-height: 20px;
            margin-top: 16px;
          }
        }
      }
    }
  }
  .more-simple {
    margin: 30px 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    .title-image {
      width: 268px;
    }
  }
}
</style>
